Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

oracle.AWXML
Class AllocationDefinition

java.lang.Object
  |
  +--oracle.AWXML.BaseObject
        |
        +--oracle.AWXML.SolveDefinition
              |
              +--oracle.AWXML.AllocationDefinition

public class AllocationDefinition
extends SolveDefinition

A SolveDefinition that specifies allocation instructions for an AllocationSolve. For a diagram of AllocationDefinition associations, see AllocationDefinition Class Associations.

An AllocationDefinition is owned by a Cube. An AllocationDefinition has an ordered list of Allocation objects, each of which specifies instructions for an allocation operation for a dimension hierarchy. The analytic workspace performs the allocation operations in the order in which they appear in the list. The Allocation objects in the list are instances of AllocationHierarchySpecification, which is the concrete subclass of Allocation.

An Allocation has an AllocationOperator, which specifies the type of operation, such as an even or a proportional allocation. An Allocation can also have one or more AllocationArgument objects. An AllocationArgument represents an optional argument that affects the allocation operation.

An AllocationArgument can have one or more Parameter objects. Each Parameter specifies an action that affects the allocation, such as whether the allocation adds the allocated value to the existing value of the target Measure or replaces the existing value with the allocated value.

The AllocationDefinition class includes methods for specifying certain aspects of the allocation. These methods are setChildLock, setDeadLock, and setSourceVal. See the descriptions of those methods for information on how their settings affect the allocation.

See Also:
AllocationSolve

Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

 

Constructor Summary
AllocationDefinition(BaseObject input)
          Creates an AllocationDefinition for the specified Cube.

 

Method Summary
 void addAllocation(Allocation input)
          Adds the specified Allocation at the end of the list of Allocation objects for the AllocationDefinition.
 void addAllocationAfter(Allocation input, BaseObject reference)
          Adds the specified Allocation after the referenced Allocation in the list of Allocation objects for the AllocationDefinition.
 void addAllocationBefore(Allocation input, BaseObject reference)
          Adds the specified Allocation before the referenced Allocation in the list of Allocation objects for the AllocationDefinition.
 void addAllocationFirst(Allocation input)
          Adds the specified Allocation at the beginning of the list of Allocation objects for the AllocationDefinition.
 java.lang.String Create(AWConnection connection)
          Creates the AllocationDefinition in the current analytic workspace of the specified database connection.
 AllocationHierarchySpecification createAllocateHierarchySpecification()
          Creates an AllocationHierarchySpecification and adds it at the end of the list of Allocation objects for the AllocationDefinition.
 AllocationHierarchySpecification createAllocateHierarchySpecificationAfter(Allocation input)
          Creates an AllocationHierarchySpecification and adds it after the specified Allocation in the list of Allocation objects for the AllocationDefinition.
 AllocationHierarchySpecification createAllocateHierarchySpecificationBefore(Allocation input)
          Creates an AllocationHierarchySpecification and adds it before the specified Allocation in the list of Allocation objects for the AllocationDefinition.
 AllocationHierarchySpecification createAllocateHierarchySpecificationFirst()
          Creates an AllocationHierarchySpecification and adds it at the beginning of the list of Allocation objects for the AllocationDefinition.
 java.lang.String Delete(AWConnection connection)
          Deletes the AllocationDefinition in the current analytic workspace of the specified database connection.
 java.util.Vector getAllocations()
          Gets the ordered list of Allocation objects of the AllocationDefinition.
 java.lang.String getChildLock()
          Gets the value that specifies whether the allocation operation detects a child lock condition.
 java.lang.String getDeadLock()
          Gets the value that specifies whether the allocation operation skips a locked or NA value.
 java.lang.String getSourceVal()
          Gets the value that specifies the value that an allocation operation assigns to a basis Measure after it has successfully allocated the original basis value to the target Measure.
 void readAWDefinitions(AWConnection connection, boolean readType)
          Reads the objects owned by the AllocationDefinition into memory, making them available for processing within the current analytic workspace of the specified database connection.
 void removeAllocation(Allocation input)
          Removes an Allocation from the list of Allocation objects of the AllocationDefinition.
 void setChildLock(java.lang.String input)
          Specifies whether the allocation operation determines whether a parent and one or more of its children are protected from the allocation.
 void setDeadLock(java.lang.String input)
          Specifies whether the allocation operation continues when it encounters a target value that is specified by a protected dimension member or when the basis value is NA.
 void setSourceVal(java.lang.String input)
          Specifies the value that an allocation operation assigns to a basis Measure after it has successfully allocated the original basis value to the target Measure.
 java.lang.String WriteToXML()
          Gets an XML representation of the AllocationDefinition.

 

Methods inherited from class oracle.AWXML.BaseObject
Alter, CreateAfter, CreateBefore, CreateFirst, DataRead, getColumnName, getId, getLongName, getLongName, getName, getOwner, getPluralName, getPluralName, getSchema, getShortName, getShortName, setColumnName, setLongName, setLongName, setName, setPluralName, setPluralName, setSchema, setShortName, setShortName

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AllocationDefinition

public AllocationDefinition(BaseObject input)
Creates an AllocationDefinition for the specified Cube. An application should create an AllocationDefinition by using the createAllocationDefinition method of a Cube.
Parameters:
input - The Cube to own the AllocationDefinition.

Method Detail

getSourceVal

public java.lang.String getSourceVal()
Gets the value that specifies the value that an allocation operation assigns to a basis Measure after it has successfully allocated the original basis value to the target Measure. See setSourceVal for more information.
Returns:
A String that contains CURRENT, ZERO, or NA.

setSourceVal

public void setSourceVal(java.lang.String input)
Specifies the value that an allocation operation assigns to a basis Measure after it has successfully allocated the original basis value to the target Measure.

The value of the input parameter of this method can be one of the following:

Parameters:
input - A String that contains CURRENT, ZERO, or NA.

getDeadLock

public java.lang.String getDeadLock()
Gets the value that specifies whether the allocation operation skips a locked or NA value. A value is locked when the basis value for a dimension member is protected from participating in the allocation. See setDeadLock for more information.
Returns:
A String that contains SKIP or NOSKIP.

setDeadLock

public void setDeadLock(java.lang.String input)
Specifies whether the allocation operation continues when it encounters a target value that is specified by a protected dimension member or when the basis value is NA. Protecting a dimension member locks the value specified by that member, so that it does not participate in the allocation.

Protected dimension members are specified by a Parameter with the PROTECTLIST keyword. The Parameter is owned by an AllocationArgument, which is owned by an Allocation of the AllocationDefinition.

The value of the input parameter of this method can be one of the following:

Parameters:
input - A String that contains SKIP or NOSKIP.

getChildLock

public java.lang.String getChildLock()
Gets the value that specifies whether the allocation operation detects a child lock condition. This condition occurs when the Measure values for a parent and one of its children are protected from participating in the allocation. See setChildLock for more information.
Returns:
A String that contains DETECT or NODETECT.

setChildLock

public void setChildLock(java.lang.String input)
Specifies whether the allocation operation determines whether a parent and one or more of its children are protected from the allocation. Protecting a dimension member locks the value specified by that member, so that it does not participate in the allocation. Locking the values for both a parent and one of its children can cause incorrect allocation results.

Protected dimension members are specified by a Parameter with the PROTECTLIST keyword. The Parameter is owned by an AllocationArgument, which is owned by an Allocation of the AllocationDefinition.

The value of the input parameter of this method can be one of the following:

Parameters:
input - A String that contains DETECT or NODETECT.

WriteToXML

public java.lang.String WriteToXML()
Gets an XML representation of the AllocationDefinition.
Overrides:
WriteToXML in class SolveDefinition
Returns:
An XML String that represents the AllocationDefinition.

addAllocation

public void addAllocation(Allocation input)
Adds the specified Allocation at the end of the list of Allocation objects for the AllocationDefinition.
Parameters:
input - The Allocation to add to the AllocationDefinition.

addAllocationAfter

public void addAllocationAfter(Allocation input,
                               BaseObject reference)
Adds the specified Allocation after the referenced Allocation in the list of Allocation objects for the AllocationDefinition.
Parameters:
input - The Allocation to add to the AllocationDefinition.
reference - The Allocation after which to add the Allocation.

addAllocationBefore

public void addAllocationBefore(Allocation input,
                                BaseObject reference)
Adds the specified Allocation before the referenced Allocation in the list of Allocation objects for the AllocationDefinition.
Parameters:
input - The Allocation to add to the AllocationDefinition.
reference - The Allocation before which to add the Allocation.

addAllocationFirst

public void addAllocationFirst(Allocation input)
Adds the specified Allocation at the beginning of the list of Allocation objects for the AllocationDefinition.
Parameters:
input - The Allocation to add to the AllocationDefinition.

removeAllocation

public void removeAllocation(Allocation input)
Removes an Allocation from the list of Allocation objects of the AllocationDefinition.
Parameters:
input - The Allocation to remove.

getAllocations

public java.util.Vector getAllocations()
Gets the ordered list of Allocation objects of the AllocationDefinition.
Returns:
A Vector of Allocation objects.

createAllocateHierarchySpecification

public AllocationHierarchySpecification createAllocateHierarchySpecification()
Creates an AllocationHierarchySpecification and adds it at the end of the list of Allocation objects for the AllocationDefinition.
Returns:
The new AllocationHierarchySpecification.

createAllocateHierarchySpecificationAfter

public AllocationHierarchySpecification createAllocateHierarchySpecificationAfter(Allocation input)
Creates an AllocationHierarchySpecification and adds it after the specified Allocation in the list of Allocation objects for the AllocationDefinition.
Parameters:
input - The Allocation in the list after which to add the new AllocationHierarchySpecification.
Returns:
The new AllocationHierarchySpecification.

createAllocateHierarchySpecificationBefore

public AllocationHierarchySpecification createAllocateHierarchySpecificationBefore(Allocation input)
Creates an AllocationHierarchySpecification and adds it before the specified Allocation in the list of Allocation objects for the AllocationDefinition.
Parameters:
input - The Allocation in the list before which to add the new AllocationHierarchySpecification.
Returns:
The new AllocationHierarchySpecification.

createAllocateHierarchySpecificationFirst

public AllocationHierarchySpecification createAllocateHierarchySpecificationFirst()
Creates an AllocationHierarchySpecification and adds it at the beginning of the list of Allocation objects for the AllocationDefinition.
Returns:
The new AllocationHierarchySpecification.

Create

public java.lang.String Create(AWConnection connection)
Creates the AllocationDefinition in the current analytic workspace of the specified database connection.
Overrides:
Create in class BaseObject
Parameters:
connection - The AWConnection that specifies the database connection.
Returns:
A String that contains success if this method successfully creates the AllocationDefinition.

Delete

public java.lang.String Delete(AWConnection connection)
Deletes the AllocationDefinition in the current analytic workspace of the specified database connection.
Overrides:
Delete in class BaseObject
Parameters:
connection - The AWConnection that specifies the database connection.
Returns:
A String that contains success if this method successfully deletes the AllocationDefinition.

readAWDefinitions

public void readAWDefinitions(AWConnection connection,
                              boolean readType)
Reads the objects owned by the AllocationDefinition into memory, making them available for processing within the current analytic workspace of the specified database connection.
Parameters:
connection - The AWConnection that specifies the database connection.
readType - A boolean that specifies whether to read into memory the child objects of the AllocationSpecification. Specify true to read the AllocationSpecification and all its child objects or false to read the AllocationSpecification but omit specific child objects.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

Copyright © 2003, 2005 Oracle. All rights reserved.